Wing Commander Prophecy: Unlimited
James Grimstead 2025

Use of this software is at your own risk and I accept no
responsibility for any damage caused.  It can be used freely
for any mod or enhancement you wish to make to WCP/SO without
restriction although I would like to be credited in any mods
this is used in.

This DLL and accompanying EXE files are designed for developers
of game modifications based on Wing Commander Prophecy and
Secret Ops.  It allows modders to use more detailed in game 
models and more objects per mission.

I intend to continuously update the dll to remove more
limitations that are found and be able to change other game
configurations previously not possible through the IFF files,
for example turret refire delay and max turrets/components
per ship.

If you have any suggestions or find any issues please contact
me on the CIC forums @gr1mre4per


### Instructions

Copy the wcpunl.dll and appropriate game exe file into the
games main directory.  Secret Ops comes in two flavours, CD
and Web.  Choose the exe from the Secret Ops CD folder if you
have Secret Ops CD from Prophecy Gold, else use the exe from
Secret Ops Web folder for the web released version.

Please delete wcpunl.cfg as it will no longer be used. Use
wcpunl.ini instead.


### HD and DVD Requirements

Download ODVS's Prophecy HD Video Pack or the original DVD Movie
Pack from the www.wcnews.com Resources/Patches page and extract 
into the 'movie' folder within WCP's root folder.

Ignore instructions to install the DVD Movie Upgrade Patch as
this seems to be having problems with more recent Windows
(hence this update).

ODVS's HD Video Pack:
		Seems to work straight away with no additional codec packs
		installed. Tested on a fresh install of Windows 11 N 25h2
		with Media Feature Pack added (required to play WCP and SO
		on N and KN versions).

DVD Movie Pack:	
		1. Download and install MPEG2 free from the Microsoft
		   store. https://apps.microsoft.com/detail/9N95Q1ZZPMH4
		2. Windows 11 24h2 and later fresh install, install the
		   Windows Dolby Audio package. (included)

* No overlay window is created, no need to match resolutions.  Uses existing GL movie function.
* Movies will work in the original Software, Direct3d and 3Dfx Glide modes. 
* Movies will work in the OpenGL 1.2 and earlier, not filling wide-screens.
* Movies will work in the OpenGL 1.3 and later, fills wide-screens.
* Gamma Correction, Show Movies and Subtitles in game options work.
* Even Interlaced Video will work in the original modes for a retro look!

### WCPUNL Beta 6.4
* Minor internal changes relating to subtitles.

### WCPUNL Beta 6.3
* Video processing moved into it's own thread to reduce stuttering at lower framerates.

### WCPUNL Beta 6.2
* Fixed video not working on Windows 10.
* IoEvent enumeration updated so movies exit correctly in all exit situations.
* Better handling of loading and decoding errors so the fall-back player will be used instead of a blank screen.
* Non square pixel aspect ratios correctly accounted for (VOB files are 704x480 at 10:11 aspect ratio = 640x480).
* Movies now play at their native resolution or the resolution specified by the GL, whichever is smallest.  Previously always tried to match the GL settings.
* Subtitles decoupled from framerate, now uses movie sequence clock time.
* Corrected small error in subtitle font settings.
* Added De-interlacer for interlaced VOB files.
* Double frame rate for interlaced VOB files, blending of field 0 and field -1, as well as field 0 and field 1.
* Movie Player can be disabled via ini setting.
* Read Me updated with a section for description of all INI settings.
* New INI settings will appear in your wcpunl.ini after running the game for the first time after update.

### WCPUNL Beta 6.1
* Support for both CD and GoG installations using the prophecy.exe supplied in this package.
    A CD check is done, if no CD is found a local file check is performed.  If no local files found, Change CD screen will appear.

### WCPUNL Beta 6.0
* Fixed memory leak in the new Movie Player
* Turret barrel fire respects wcpunl.ini setting again
* File loading priority changed so directory has priority over tree file (no need to patch data.tre anymore)

### WCPUNL Beta 5.2
* Fixed spaceflight music not restarting after an in-flight cutscene (last mission).


### WCPUNL Beta 5.1
* ODVS's HD and original DVD movie support. Added to Prophecy only.  
* Many thanks to Pedro for testing and updating the OpenGL to take full advantage.


### WCPUNL Beta 4.0
* 'Dead Capships' modification works across all game versions.


### WCPUNL Beta 3.1

* Fixed some incorrect offsets in Secret Ops CD, causing crashes when staring spaceflight
* Replaced wcpunl.cfg with wcpunl.ini
* Removed ultraNightmare
* Added TurretRefireFromBulletIff default to 0
* Added first test of 'Dead Capships' modification for Secret Ops CD variant only
* Added ability to load other developers' custom DLL's


### WCPUNL Beta 2.9

* More memory tweaks
* Pre-loading mesh materials
* Pre-loading bitmaps
* UltraNightmare test
* Capship gun turrets now use the refire delay from BULLET.IFF instead of being fixed at 1 second.
* Fixed bug where certain weapon types would impact the front shield/armour when shooting the rear (and vise versa) on Corvette style ships.
* Implemented change to show hull impact instead of shield impact when Corvette shields are too low to absorb all damage from a weapon.


### WCPUNL Beta 2.8

* All MBM's are now unlimited
* Tweaked maximum object limits based on engine performance limits
* Tweaked maximum renderable object limit based on engine performance limits
* Heap size is now unlimited, Secret Ops no longer randomly crashes
* CObjectTable increased from default 256
* AIQ list increased from default 200
* ActionSphere limit increased from default 256
* Included distance increase for ship rendering
* Disabled FAR chunk so all fighters render at long range


### WCPUNL Beta 2.7

* Another MBM tweak for better stability in Secret Ops.
* Reduced creatable objects further for better stability in Secret Ops.
* Found and fixed two incorrect offsets with turret limit code in Secret Ops CD.


### WCPUNL Beta 2.6

* More MBM tweaking to improve stability in Secret Ops.


### WCPUNL Beta 2.5

* Reduced max number of creatable objects until I find cause of crash in Secret Ops intro.


### WCPUNL Beta 2.4

* Memory block manager size adjusted due to issues with Secret Ops CD version.
* Max fighter turrets increased from 6 to 32.
* Max cap ship turrets increased from 32 to 256.


### WCPUNL Beta 2.3

* Compiled dll with C++ runtimes built in.


### WCPUNL Beta 2.2

* Maximum dot product calculations on mesh normals increased
  from 1024 to 9999999 to allow more detailed in game meshes.

* Maximum renderable objects increased from 256 to 30000 to
  allow more objects on screen without crashing.

* Total creatable objects of multiple different types (ships,
  bullets, asteroids) increased to allow more objects per mission.

* Memory Block Management increased to allow many more objects of
  different types.  Missile trails no longer break up with
  many missiles in the 'air'.

* Frame rate can be increased from the default 32 in wcpunl.cfg.
  I recommend you set it above your monitor refresh for a more
  smooth result.  Setting it at your monitor refresh seems to
  be more choppy.

* A framerate counter can be shown with a modification in wcpunl.cfg


### wcpunl.ini setting and defaults:

[CustomDlls]				-- Section for other developers to load their own hooking DLLs.
ShowFailedDlls=0			-- If 1 a pop-up appears if a DLL fails to load.
File1=					-- Filename for DLL to load.  Can also have more, File2=, File3= etc...

[Gameplay]				-- Section for some gameplay modifications.
TurretRefireFromBulletIff=0		-- If 1 turret refire will use refire delay settings from the bullet.iff instead of fixed 1 second.
TurretAlternateBarrelFire=0		-- If 1 turrets will fire alternate barrels instead of both at the same time (Like WC3/WC4), maintaining same damage per second.

[Movie Player]                          -- Section for the high definition movie player.
EnableMoviePlayer=1			-- Enable or Disable the movie player.
Force16Bit=0				-- Forces 16 bit playback for the Open GL 1.3. OpenGL 1.2/Software/Direct3d/3dfx uses 16 bit anyway.
Dither16Bit=1                           -- Dithering gives a better visual quality for 16bit playback but is higher CPU usage.  Set to 0 for better performance.
ConstrainResolution=0			-- Forces output to maximum 640x480 for OpenGL 1.3.  Other GL versions default to this.
Deinterlacer=1				-- De-interlaces the original VOB files.  Not a huge performance hit, but disable if any performance issues.
DoubleInterlacedFramerate=1		-- Adds an extra frame when blending interlaced fields.  Disable if any performance issues.
AspectRatioNumerator=16			-- Aspect ratio override.  Can make a wider screen by reducing height of the movie.
AspectRatioDenominator=9		   Standard 16:9 would be Numerator 16 and Denominator 9.  2:1 is also a common, slightly wider aspect.
ChangeAspectFromMovieNumber=10		-- Which movie number to apply the aspect override from.  Default 10 excludes Origin and Dolby logos which are 4:3. 0 = All. -1 = None.

[Graphics]				-- Section for graphic related variables
MaxFps=85				-- Overrides the game's default 32fps.  This can be stuttery, better to use a high number and limit by screen refresh rate/vsync on.
ShowFps=0				-- Show FPS in game.  The first value is actual FPS, the second is the game's estimate of FPS if the game wasn't limited.